<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\InvestLog
 *
 * @property integer $id
 * @property integer $user_id
 * @property integer $org_id
 * @property integer $project_id
 * @property string $invest_type
 * @property integer $money_num
 * @property string $money_desc
 * @property integer $stock_num
 * @property string $invest_time
 * @property string $invest_account
 * @property string $money_type
 * @property integer $status
 * @property integer $invest_user_type
 * @property string $org_name
 * @property string $investor_name
 * @property integer $is_lead
 * @property integer $is_online_finance
 * @property string $deleted_at
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property-read \App\Project $toProject
 * @property-read \App\User $toUser
 * @property-read \App\Invest $toInvestOrg
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereUserId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereOrgId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereProjectId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereInvestType($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereMoneyNum($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereMoneyDesc($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereStockNum($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereInvestTime($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereInvestAccount($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereMoneyType($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereStatus($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereInvestUserType($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereOrgName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereInvestorName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereIsLead($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereIsOnlineFinance($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\InvestLog whereUpdatedAt($value)
 */
class InvestLog extends Model {

	//表名
    protected $table = 'invest_log' ;
    use SoftDeletes;

    /** 关联项目表 */
    public function toProject(){
        return $this->belongsTo('App\Project','project_id');
    }

    /** 关联用户表 */
    public function toUser()
    {
        return $this->belongsTo('App\User','user_id');
    }

    /** 关联投资机构表 */
    public function toInvestOrg()
    {
        return $this->belongsTo('App\InvestOrg' , 'org_id');
    }
}
